package com.yx1996.bean.day01;

//创建user的工厂
public class UserFactory {

    public UserFactory() {
        System.out.println("UserFactory无参构造方法！！！");
    }

    public static User createUser(){

        System.out.println("静态工厂创建user对象");
        return new User();
    }


    public  User createUser1(){

        System.out.println("实例工厂创建user对象");
        return new User();
    }
}
